package org.deng.learn.designpattern.strategy;

/**
 * @author DengLibin
 * @Description 执行者
 * @Date 2018/11/9 0009 12:17
 */
public class Operator {

    public  static  void main(String[] args){
        //拿到第一个锦囊
        Context context = new Context(new FirstStrategy());
        //执行计策
        context.operate();

        //拿到第二个锦囊
        context = new Context(new SecondStrategy());
        //执行计策
        context.operate();

        //拿到第三个锦囊
        context = new Context(new ThirdStrategy());
        //执行计策
        context.operate();
    }
}
